package com.itlong.cloud.sdk.dao;

import com.itlong.cloud.POJO.VO.sdk.SDKJDAttriButeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * <desc>
 *     京东业务处理数据访问接口
 * </desc>
 *
 * @createDate 2020/08/11
 */
@Repository
@Mapper
public interface ISDKJdDao {
    /**
     * <desc>
     *      绑定设备
     * </desc>
     *
     * @param deviceId
     * @param deviceUnique
     * @param deviceType
     * @return
     * @author Jiaqi.X
     * @createDate 2020/08/11
     */
    Integer bindDeviceId(@Param("deviceId") String deviceId,@Param("deviceUnique") String deviceUnique,
                         @Param("deviceType") Integer deviceType);


    /**
     * <desc>
     *      检测设备id是否已经被绑定
     * </desc>
     *
     * @param deviceId
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2020/08/11
     */
    Integer checkBindDeviceId(@Param("deviceId") String deviceId,@Param("deviceUnique") String deviceUnique,
                              @Param("deviceType") Integer deviceType);

    /**
     * <desc>
     *      获取京东需要获取的属性列表
     * </desc>
     *
     * @param deviceId
     * @param deviceType
     * @return
     * @author Jiaqi.X
     * @createDate 2020/08/11
     */
    SDKJDAttriButeVO getInitAttribute(@Param("deviceId") String deviceId,@Param("deviceType") Integer deviceType);

    /**
     * <desc>
     *      查询华为云id
     * </desc>
     *
     * @param deviceId
     * @return
     * @author Jiaqi.X
     * @createDate 2020/08/17
     */
    String getHwDeviceId(@Param("deviceId") String deviceId,@Param("deviceType") Integer deviceType);

    /**
     * <desc>
     * 京东设备id
     * </desc>
     *
     * @param deviceUnique 设备编号
     * @param deviceType   设备类型
     * @return
     * @author caoshuai
     * @createDate 2020/09/07
     */
    Map<String,Object> getDeviceInfo(@Param("deviceUnique") String deviceUnique, @Param("deviceType") Integer deviceType);

    /**
     * <desc>
     * 京东设备id
     * </desc>
     *
     * @param jdDeviceId JD设备编号
     * @param deviceType 设备类型
     * @return
     * @author caoshuai
     * @createDate 2020/09/07
     */
    Map<String,Object> getDeviceInfoByJDDeviceId(@Param("jdDeviceId")String jdDeviceId, @Param("deviceType") Integer deviceType);
}
